const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer:{
    open:true,
    host:"127.0.0.1",
    port:"9898",
    //最简单的配置，只能配置一个
    // proxy: "http://gmall-h5-api.atguigu.cn",
    proxy:{
      "/dev-api1":{
        target:"http://gmall-h5-api.atguigu.cn",
        pathRewrite:{
          "^/dev-api1": "",
        },
        //伪装自己的地址
        changeOrigin :true,
      },
    },
  },
  configureWebpack: {
    resolve: {
      alias: {
        "@assets": "@/assets",
        "@comp":"@/components",
        "@utils":"@/utils",
        "@pages":"@/pages"
      },
    },
  },
})
